Create View V_NhanVien
as
	select * from NhanVien
go
Create View V_NhaCungCap
as 
	Select * from NhaCungCap
go
Create View V_DonViTinh
as
	Select * from DonViTinh
go

------ Report------------------------------
Create View V_RHoaDon
as
	select a.Mahd,c.Masp,tensp,tennv,soluong,dvt,b.dongia,thanhtien,tenkh,ngaylap,ghichu,tongsl,tongtien,dbo.doitien(tongtien) as 'Tien viet chu'
	from HoaDon a,CTHoaDon b,Sanpham c,Nhanvien d
	where a.mahd=b.mahd and c.masp=b.masp and a.manv=d.manv
go
Create View V_SanPhamTon
as
	select a.masp,tensp,tongsp
	from sanpham a,tonsp b
	where a.masp=b.masp
go